﻿<T:ViewBase
 x:Class="WPFExcelReport.VWPLANVKP"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
 xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
    xmlns:UserControls="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Controls"
    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"
    Background="White"
 >
    <T:ViewBase.Resources>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:JWCONVERTER  x:Key="JW"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <CollectionViewSource  x:Key="vwWARP" Source="{Binding Path=SetDetail.ICC_ABAX}" />
        <CollectionViewSource  x:Key="vwWEFT" Source="{Binding Path=SetEnv.ICC_ABAX}" />
    </T:ViewBase.Resources>
    <Grid  Margin="10,10,0,0" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="1" >
            <Grid.RowDefinitions>
                <RowDefinition   Height="Auto" />
                <RowDefinition   Height="Auto" />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                <WrapPanel Grid.Column="0">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="20"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="发布"  Width="Auto"></TextBlock>
                        <Button Grid.Column="1" Name="btnPublish" Height="20"  Width="20" Margin="0,0,0,0" Visibility="{Binding CanPublish, Converter={StaticResource ResourceKey=bv}}"   Click="btnPublish_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="/IntexReportClient;component/Images/Save.png" />
                            </Button.Background>
                        </Button>
                    </Grid>
                    <TextBlock    Text="{Binding Source={Localization:Translate Word=打印}}" ></TextBlock>
                    <Button   Height="20"  Width="20" Margin="0,0,0,0"   Click="btnPrintAV95_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                        <Button.Background>
                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Print.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Grid.Column="2" Text="删除网络" Margin="20,0,0,0" ></TextBlock>
                    <Button  Height="20" Visibility="{Binding CanDelete, Converter={StaticResource ResourceKey=bv}}" Width="20" Margin="20,0,0,0" Name="btnDeleteABON" Click="btnDeleteABON_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                        <Button.Background>
                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Delete.png" />
                        </Button.Background>
                    </Button>
                </WrapPanel>
                <WrapPanel  Visibility="Collapsed">
                    <Label   Content="品种:" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <TextBox  Name="txtART"  MaxLength="20" Width="240" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Pink" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                    <TextBox  Name="txtVAR" MaxLength="2" Width="40" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Pink" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                    <TextBlock  Margin="20,0,0,0" Width="43">颜色:</TextBlock>
                    <TextBox  Name="txtWAFZUSATZ" Text="中色        " Background="#17000000" Height="27" Width="44">
                    </TextBox>
                    <TextBlock  Margin="20,0,0,0" Width="60" Height="24">后整理:</TextBlock>
                    <TextBox  Name="txtFINISH" Text="F1          " Background="#17000000" Height="24" Width="53">
                    </TextBox>
                </WrapPanel>

            </StackPanel>
            <StackPanel  Grid.Row="1">
                <WrapPanel>
                    <TextBlock Margin="20,0,0,0" Text="{Binding Source={Localization:Translate Word=色纱重量}}"></TextBlock>
                    <TextBlock   FontSize="12"     Width="Auto" MinWidth="80"  Text="{Binding BASEQTY}"  Margin="10,0,0,0" />
                    <TextBox  Background="LightPink"   Text="{Binding MQTY}" KeyDown="TextBox_KeyDown"   FontSize="12"     Width="60"  CharacterCasing="Upper" Margin="10,0,0,0" />
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="染缩(回车)"></TextBlock>
                        <TextBox Grid.Column="1" Text="{Binding NGR02}" MinWidth="30" KeyDown="TXTNGR02_KeyDown"  Width="Auto"></TextBox>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="常数(回车)"></TextBlock>
                        <TextBox Grid.Column="1" Text="{Binding NGF02}" MinWidth="30" KeyDown="TXTNGF02_KeyDown"  Width="Auto"></TextBox>
                    </Grid>
                    <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=数量调整}}" ></TextBlock>

                    <Button Width="20" Height="20" Click="Mqty_Click">
                        <Button.Background>
                            <ImageBrush ImageSource="/IntexReportClient;component/Images/button_ok.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=在预计划时使用}}" Foreground="Red"></TextBlock>
                    <TextBlock Margin="20,0,0,0" Text="{Binding Source={Localization:Translate Word=头份}}"></TextBlock>
                    <TextBox Background="LightBlue"   KeyDown="TextBox_KeyDown"  FontSize="12"     Width="60"  Text="{Binding TTENDS, Source={StaticResource ResourceKey=vwWARP}}"  Margin="10,0,0,0" />
                    <TextBlock Margin="20,0,0,0" Text="{Binding Source={Localization:Translate Word=轴数}}"></TextBlock>
                    <TextBox  Background="LightCyan"  KeyDown="TextBox_KeyDown"  FontSize="12" LostFocus="BeaNum_LostFocus"    Width="30"  Text="{Binding UNITNUM, Source={StaticResource ResourceKey=vwWARP}}"  Margin="10,0,0,0" />
                    <TextBlock Margin="20,0,0,0" Text="{Binding Source={Localization:Translate Word=单轴头份}}"></TextBlock>
                    <TextBox Background="LightCoral" LostFocus="BeamEnds_LostFocus"  FontSize="12"   KeyDown="TextBox_KeyDown"    Width="40"  Text="{Binding UENDS, Source={StaticResource ResourceKey=vwWARP}}"  Margin="10,0,0,0" />
                </WrapPanel>
                <WrapPanel Visibility="Collapsed">
                    <TextBlock Visibility="Collapsed" Margin="20,0,0,0" Text="{Binding Source={Localization:Translate Word=筒子只数}}"></TextBlock>
                    <TextBox  Visibility="Collapsed" Background="LightGreen"  KeyDown="TextBox_KeyDown"  FontSize="12"     Width="60"  Text="{Binding ABASANZSTK, Source={StaticResource ResourceKey=vwWARP}}"  Margin="10,0,0,0" />
                    <TextBlock Text="{Binding Source={Localization:Translate Word=确认}}"></TextBlock>
                    <Button Width="20" Height="20" Click="WarpingTech_Click">
                        <Button.Background>
                            <ImageBrush ImageSource="/IntexReportClient;component/Images/button_ok.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=计划后使用需确认}}" Foreground="Green"></TextBlock>
                    <TextBlock Margin="20,0,0,0" Text="{Binding Source={Localization:Translate Word=经纱说明}}"></TextBlock>
                    <TextBox Background="LightGoldenrodYellow"  KeyDown="TextBox_KeyDown"   FontSize="12"   Width="300" Text="{Binding REMARK, Source={StaticResource ResourceKey=vwWARP}}"  Margin="34,0,0,0" />
                </WrapPanel>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="1"   Grid.Column="0" Grid.ColumnSpan="1"  >
            <Grid.RowDefinitions>
                <RowDefinition   Height="Auto" />
                <RowDefinition   Height="1*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <WrapPanel Grid.Row="0" Grid.Column="0">
                <TextBlock Text="经纱"></TextBlock> 
                    <TextBlock  Margin="20,0,0,0" Text="{Binding Source={Localization:Translate Word=脚纱库存}}"></TextBlock>
                    <TextBox Background="LightGoldenrodYellow"  KeyDown="TextBox_KeyDown"   FontSize="12"     Width="40"  Text="{Binding ABAQTYALLOCATE, Source={StaticResource ResourceKey=vwWARP}}"  Margin="10,0,0,0" />
                   
                <TextBlock Text="{Binding Source={Localization:Translate Word=确认}}"></TextBlock>
                <Button Width="20" Height="20" Click="WarpingTech_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/button_ok.png" />
                    </Button.Background>
                </Button>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <ex:TXT72 MaxLength="40" Text="{Binding SELLERNAME,Source={StaticResource vwWARP },Converter={StaticResource gb2312}}" Width="60"/>
                </Grid>
                <TextBlock Text="{Binding Source={Localization:Translate Word=计划后使用需确认}}" Foreground="Green"></TextBlock> 
            </WrapPanel>
            <DataGrid Grid.Row="1" Grid.Column="0"
                          AutoGenerateColumns="False" EnableRowVirtualization="True"
                              Name="dlgJABP"
                          HeadersVisibility="Column" 
                          FontSize="12" 
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwWARP}}"    
                          Width="Auto"
                          Height="Auto" 
                          ScrollViewer.HorizontalScrollBarVisibility="Auto"
                          ScrollViewer.VerticalScrollBarVisibility="Auto" 
                          >
                <DataGrid.Columns> 
                    <DataGridTextColumn Binding="{Binding Path=ABAART,Converter={StaticResource ResourceKey=Trim}}" Header="纱线" Width="Auto" MinWidth="40" /> 
                    <DataGridTextColumn Binding="{Binding Path=ABAFARBE}" Header="色号" Width="Auto" MinWidth="40" /> 
                    <DataGridTextColumn Binding="{Binding Path=ABACOLORREF,Converter={StaticResource ResourceKey=gb2312}}" Header="色名" Width="40" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=SELLERNAME,Converter={StaticResource ResourceKey=gb2312}}" Header="厂家批号" Width="40" MinWidth="40" />
                    <DataGridTextColumn  Binding="{Binding Path=ABARESMG, Converter={StaticResource ResourceKey=d1000}}" Header="KG+" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=FBRTU}"    Header="染缩" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Binding="{Binding Path=F02DES}" Header="经向脚纱" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAUMART, Converter={StaticResource ResourceKey=gb2312}}" Header="大小轴" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Binding="{Binding Path=UNITNUM}" Header="轴数" Width="Auto" MinWidth="10" />
                    <DataGridTextColumn Binding="{Binding Path=UENDS}" Header="单轴头份" Width="Auto" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=TTENDS}" Header="总头份" Width="Auto" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABAQTYALLOCATE}" Header="脚纱库存" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Visibility="Collapsed" Binding="{Binding Path=ABASANZSTK}" Header="筒子数" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFKRS}" Visibility="Collapsed" Header="" Width="Auto" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFLFD}" Header="染色单" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFPOS}" Visibility="Collapsed" Header="" Width="Auto" MinWidth="40" />
                </DataGrid.Columns>
            </DataGrid>

            <WrapPanel Grid.Row="0" Grid.Column="1">
                <TextBlock Text="纬纱"></TextBlock> 
                    <TextBlock  Margin="20,0,0,0" Text="{Binding Source={Localization:Translate Word=脚纱库存}}"></TextBlock>
                    <TextBox Background="LightGoldenrodYellow"  KeyDown="TextBox_KeyDown"   FontSize="12"     Width="40"  Text="{Binding ABAQTYALLOCATE, Source={StaticResource ResourceKey=vwWEFT}}"  Margin="10,0,0,0" />
                      <TextBlock Text="{Binding Source={Localization:Translate Word=确认}}"></TextBlock>
                    <Button Width="20" Height="20" Click="WeftTech_Click">
                        <Button.Background>
                            <ImageBrush ImageSource="/IntexReportClient;component/Images/button_ok.png" />
                        </Button.Background>
                    </Button>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <ex:TXT72 MaxLength="40" Text="{Binding SELLERNAME,Source={StaticResource vwWEFT },Converter={StaticResource gb2312}}" Width="60"/>
                </Grid>
                <TextBlock Text="{Binding Source={Localization:Translate Word=计划后使用需确认}}" Foreground="Green"></TextBlock>
            </WrapPanel>
            <DataGrid Grid.Row="1" Grid.Column="1"
                          AutoGenerateColumns="False" EnableRowVirtualization="True"
                              Name="dlgWABP"
                          HeadersVisibility="Column" 
                          FontSize="12" 
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwWEFT}}"    
                          Width="Auto"
                          Height="Auto" 
                          ScrollViewer.HorizontalScrollBarVisibility="Auto"
                          ScrollViewer.VerticalScrollBarVisibility="Auto" 
                          >
                <DataGrid.Columns> 
                    <DataGridTextColumn Binding="{Binding Path=ABAART}" Header="纱线" Width="60" MinWidth="40" />
                    <DataGridTextColumn Visibility="Collapsed" Binding="{Binding Path=ABAVAR}" Header="版本" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAFARBE}" Header="色号" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABACOLORREF,Converter={StaticResource ResourceKey=Trim}}" Header="色名" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=SELLERNAME,Converter={StaticResource ResourceKey=gb2312}}" Header="厂家批号" Width="40" MinWidth="40" />
                    <DataGridTextColumn  Binding="{Binding Path=ABARESMG, Converter={StaticResource ResourceKey=d1000}}" Header="KG" Width="40" MinWidth="60" />
                    <DataGridTextColumn Binding="{Binding Path=FBRTU}"    Header="染缩" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Binding="{Binding Path=ABAQTYALLOCATE}" Header="脚纱库存" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFKRS}" Visibility="Collapsed" Header="" Width="Auto" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFLFD}" Header="染色单" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABAAUFPOS}" Visibility="Collapsed"  Header="" Width="Auto" MinWidth="40" />
                    
                </DataGrid.Columns>
            </DataGrid>
        </Grid>
    </Grid>
</T:ViewBase>
